IIIF does not mandate a particular image format for serving images.
However, there are two formats that are particularly suitable, as they are pyramidal
formats that can provide multiple resolutions, and extracted tiles easily and efficiently.
JPEG2000
Pyramid Tiff
In the repository of simple scripts created to go along with this workshop:
https://github.com/mattmcgrattan/oslo_demos
I provide some very simple shell scripts that will use:
This workshop isn't the right place to describe how you might install the right dependencies for this, but I have provided some links.
The shell script provided in this repository will generate pyramid tiffs which can be used to server IIIF Image API requests.
https://jcupitt.github.io/libvips/install.html
The instructions at the above link are comprehensive.
sh ./vips_tiff.sh INPUT_FILE OUTPUT_FILE
Building OpenJPEG from source is not easy.
Instructions can be found:
https://github.com/uclouvain/openjpeg/blob/master/INSTALL.md
On a Mac with Homebrew installed, you can do:
brew install openjpeg
The shell script provided in this repository will generate a JPEG2000 with lossy compression.
sh ./open_jpeg.sh INPUT_FILE OUTPUT_FILE
N.B. the shell script expects to write temporary files to /tmp
but this can easily be changed to wherever you wish.
The shell script assumes you have Imagemagick installed.
https://imagemagick.org/script/download.php
You must also have the Kakadu binaries in your path.
http://kakadusoftware.com/downloads/
The shell script provided in this repository will generate a JPEG2000 with lossy compression.
sh ./kakadu_gen.sh INPUT_FILE OUTPUT_FILE
N.B. the shell script expects to write temporary files to /tmp
but this can easily be changed to wherever you wish.